package com.smt.ejb3;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class StudentClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		EntityManagerFactory emf = Persistence.createEntityManagerFactory("ejb3resourcelocal");
		EntityManager em = emf.createEntityManager();
		em.getTransaction().begin();
		Student s = new Student();
		s.setName("Old sun");
		em.persist(s);
		em.getTransaction().commit();
		em.close();

	}

}
